<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <title>Show Event</title>
</head>
<body>
<div class="nav">
  <span class="menuButton"><a class="home" href="${createLinkTo(dir: '')}">Home</a></span>
  %{--<span class="menuButton"><g:link class="list" action="list">Event List</g:link></span>--}%
  <span class="menuButton"><g:link class="create" action="create">New Event</g:link></span>
  <g:render template="/common/menubar"/>
</div>
<div class="body">
  <h1>Show Event</h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <div class="dialog">
    <table>
      <tbody>
      <tr class="prop">
        <td valign="top" class="name">Id:</td>
        <td valign="top" class="value">${fieldValue(bean: eventInstance, field: 'id')}</td>
      </tr>
      <tr class="prop">
        <td valign="top" class="name">Name:</td>
        <td valign="top" class="value">${fieldValue(bean: eventInstance, field: 'name')}</td>
      </tr>
      <tr class="prop">
        <td valign="top" class="name">Description:</td>
        <td valign="top" class="value">${fieldValue(bean: eventInstance, field: 'description')}</td>
      </tr>
      <tr class="prop">
        <td valign="top" class="name">Location:</td>
        <td valign="top" class="value">${fieldValue(bean: eventInstance, field: 'location')}</td>
      </tr>
      <tr class="prop">
        <td valign="top" class="name">Start Date:</td>
        <td valign="top" class="value">${fieldValue(bean: eventInstance, field: 'startDate')}</td>
      </tr>
      <tr class="prop">
        <td valign="top" class="name">End Date:</td>
        <td valign="top" class="value">${fieldValue(bean: eventInstance, field: 'endDate')}</td>
      </tr>
      <tr class="prop">
        <td valign="top" class="name">Administrator:</td>
        <td valign="top" class="value"><g:link controller="userAccount" action="show" id="${eventInstance?.administrator?.id}">${eventInstance?.administrator?.encodeAsHTML()}</g:link></td>
      </tr>
      <tr class="prop">
        <td valign="top" class="name">Positions:</td>
        <td valign="top" style="text-align:left;" class="value">
          <ul>
            <g:each var="p" in="${eventInstance.positions}">
              <li><g:link controller="position" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li>
            </g:each>
          </ul>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
  %{--<div class="buttons">--}%
    %{--<g:form>--}%
      %{--<input type="hidden" name="id" value="${eventInstance?.id}"/>--}%
      %{--<span class="button"><g:actionSubmit class="edit" value="Edit"/></span>--}%
      %{--<span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete"/></span>--}%
    %{--</g:form>--}%
  %{--</div>--}%
</div>
</body>
</html>
